COMP 440/COMP 557

Artificial Intelligence

Pacwar

All material on this website is © Devika Subramanian, 2007-2017. Please request permission from devika@rice.edu for use of the material, and please acknowledge this site in your material.

The Pacwar Project

This problem is about designing killer species that live in an imaginary world called PAC-world, created by Donald Knuth of Stanford University. PAC-world is inhabited by several species of tiny creatures called PAC-mites, all of which are engaged in a constant struggle for survival with every other species. Each individual mite lives out its short lifetime by following a small set of deterministic rules and interacting only with its immediate surroundings. However, in large numbers, the PAC-mites of a species combine to form complex patterns of behavior, which enable them to compete with PAC-mites of other species. Your goal is to design a species that will annihilate every other species in this world in a one-on-one duel.

All the primary code resources for the project are here.

key-value mapping

PAC-world and PAC-mites

The Dynamics of PAC-world

Examples

Here are a few examples to aid in the understanding of the laws of PAC-world.

How duels between species are evaluated

Duels are held only between pairs of species. Duels will continue until one species has been completely eliminated, or until 500 time units have passed. If neither species has won after 500 time units, the relative populations of the two species will be used to determine the score of the duel. Each duel is worth a total of 20 points. These 20 points will be divided between the two species as follows:


Points Outcome of a duel
20-0 Destroying the opposing species in under 100 rounds
19-1 Destroying the opposing species in 100-199 rounds
18-2 Destroying the opposing species in 200-299 rounds
17-3 Destroying the opposing species in 300-500 rounds
13-7 Outnumbering the opponent by at least 10:1 after 500 rounds
12-8 Outnumbering the opponent by between 3:1 and 10:1 after 500 rounds
11-9 Outnumbering the opponent by between 1.5:1 and 3:1 after 500 rounds
10-10 If neither species outnumbers the other by more than 1.5:1 after 500 rounds

Observe that this scoring system gives significant advantage to species that actually destroy the opposing species rather than just outnumbering them. The reason for this complicated scoring system is that the set of all PAC-mite species is probably not a totally ordered set. Thus, it is possible that no clear winner would emerge from the competition if we simply considered the number of wins/losses/draws. The scoring system makes it unlikely that this will occur.

The task

Your mission is to find a PAC-mite species that will annihilate the PAC-mites submitted by your classmates in a round-robin duel. All the primary code resources for the project are here.

Getting started

Download the code. Unzip the folder and you will see a sub-folder named C. Open up a terminal window and navigate to that subfolder. Then start up the Pacwar simulator with “myWish -f PacWar.tcl”. The PacWar window shown at the top of this page will open up and you can play with mites of your own design. You can also use it to understand the rules of PacWar.

What to hand in